<%--
  Created by IntelliJ IDEA.
  User: lanzhan
  Date: 2020/6/30
  Time: 下午6:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script>
        function revertAllFiles() {
            var $allFiles = $("input[name='check_name']:checked");
            var fileId = new Array();
            $.each($allFiles, function (i, n) {
                fileId[i] = $(this).attr("id");
            });
            $.ajax({
                type: "POST",
                url: "file/revertDirectory.action",
                data: {
                    "fileId": fileId,
                },
                success: function (data) {
                    layer.msg(data.msg);
                    setTimeout('window.location.reload()', 2500);
                },
                traditional: true
            });
        }

        function delAllFiles() {
            layer.confirm('确认清空回收站？', {
                btn: ['确认', '返回'] / 按钮
            }, function () {
                $.ajax({
                    type: "POST",
                    url: "file/delAllRecycle.action",
                    data: {},
                    success: function (data) {
                        layer.msg(data.msg);
                        window.location.reload()
                    },
                    traditional: true
                });
            }, function () {
            });
        }
    </script>
</head>
<body>

<p style="margin-bottom:20px;color: #878C8D;">您的回收站为空噢~</p>
<span>回收站为你保存10天内删除的文件，想要延长保存时间？
<p>开通会员<a href="#">延长至15天</a>开通超级会员<a href="#">延长至35天</a></p>


<div style="display:block" id="collection">
    <ul>
        <li id="list-info" class="list-border"><span class="para" id="warn">提示:回收站不占用网盘空间，文件保存10天后将自动被清除。<a href="#"
                                                                                                            style="color: #3B8CFF;">开通会员</a>延长至15天,
            <a href="#" style="color: #3B8CFF;">开通超级会员</a>延长至30天</span>
            <span class="para" id="clean">
            <img src="img/delete.png"/>
            <span style="cursor: pointer;" onclick="delAllFiles()">清空回收站</span>
        </li>
        <li class="list-collection" style="display: none">
            <span style="font-size: 12px;float:left;">回收站</span>
            <span style="font-size: 12px;float:right">已加载<span>1</span>个</span>
        </li>
        <li class="list-border">
            <input type="checkbox" id="fileCheck" style="float: left;margin-top: 0.6%;margin-left: 0.2%;"/>
            <div style="display: block;border: 0;" class="list-table" id="div1">
                <span style="width: 54%;height:100%;">文件名</span>
                <span style="width: 15%;height:100%;">大小</span>
                <span style="width: 16%;height:100%;">删除时间</span>
                <span style="width: 12%;height:100%;">有效时间</span>
            </div>
            <div style="display: none;border: 0;" class="list-table" id="div2">
                <span style="font-size: 12px;float:left;">
                <span style="float: left;">已选中</span>
                <span style="float: left;" id="num">1</span>个文件/文件夹</span>
                <span onclick="revertAllFiles()" class="para1" id="revert"
                      style="margin-top:4px;float: left;margin-left: 1.5%;">
                    <img src="img/refresh1.png"/><span style="cursor: pointer;">还原</span>
                </span>
            </div>
        </li>
    </ul>
</div>
</span>
</body>
</html>
